<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>${fns:getConfig('productName')}</title>
  	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<c:set var="tabmode" value="${empty cookie.tabmode.value ? '0' : cookie.tabmode.value}"/>
	<style type="text/css">
		#mask{
            background: #000;
            opacity: 0.75;
            /*IE兼容*/
            filter: alpha(opacity=75);
            height: 1000px;
            width: 100%;
            position: absolute;
            left: 0;
            top: 0;
            z-index: 1000;
          }
          #mainFrame{
          	width: 100%;
          	height: 100%;
          }
	</style>
	<style type="text/css">
		.float_layer{
			position: fixed;
			right: 0px;
			bottom: -131px;
			border:1px solid #0aa2e6;
			overflow: hidden;
		}
		.float_layer .tishi_heade{height:25px;line-height:25px;padding-left:10px;font-size:14px;color:#333;border-bottom:1px solid #0aa2e6;position:relative;}
		.float_layer .content2{height:130px;width:300px;overflow:hidden;font-size:14px;line-height:18px;color:#666; }
		.bottonThis{position:relative;left: 85%;z-index:1200;margin-top: -25px}
		.bottonThis>a{margin-right: 8px;}
		
	</style>
</head>
<body class="hold-transition skin-blue sidebar-mini" >

	
	<div class="float_layer" id="miaov_float_layer" style="z-index:10001;">
		
		<div class="hold-transition skin-blue tishi_heade">
			<b>信息提示</b>
			<div class="bottonThis">
				<a id="btn_min" href="javascript:void(0);" class="n"><i class="fa fa-minus"></i></a>
				<a id="btn_close" href="javascript:void(0);" class=""><i class="fa fa-remove"></i></a>
			</div>
		</div>
		<div class="content2">
			<div class="wrap2">
				<!-- <ul>
					<li><a class="nl" href="http://down.admin5.com/">右下角可关闭和最小化悬浮层 </a></li>
					<li><a class="nl" href="http://down.admin5.com/">右下角可关闭和最小化悬浮层 </a></li>
					<li><a class="nl" href="http://down.admin5.com/">右下角可关闭和最小化悬浮层 </a></li>
				</ul> -->
			</div>
		</div>
	</div>
	

<span id="msgcount"></span>
	<header id="wrapper">
		<div id="header" class="main-header">
			<a class="logo">
				<span class="logo-mini"></span>
				<span class="logo-lg" id="productName" >${fns:getConfig('productName')}</span>
			</a>
			
			<nav class="navbar navbar-static-top">
				<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"  onclick="maskSet()">
		        	<span class="sr-only">Toggle navigation</span>
		      	</a>
		      	<div class="navbar-custom-menu">
					<ul id="userControl" class="nav navbar-nav">
						<li><%-- <a href="${pageContext.request.contextPath}${fns:getFrontPath()}/index-${fnc:getCurrentSiteId()}.html" target="_blank" title="访问网站主页"><i class="icon-home"></i></a> --%></li>
						<li id="themeSwitch" class="dropdown messages-menu">
							<%-- <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="主题切换"><i class="icon-th-large"></i></a>
							<ul class="dropdown-menu">
								<c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="#" onclick="location='${pageContext.request.contextPath}/theme/${dict.value}?url='+location.href">${dict.label}</a></li></c:forEach>
								<li><a href="javascript:cookie('tabmode','${tabmode eq '1' ? '0' : '1'}');location=location.href">${tabmode eq '1' ? '关闭' : '开启'}页签模式</a></li>
							</ul> --%>
							<!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
						</li>
						<li class="dropdown notifications-menu">
							<a class="dropdown-toggle" data-toggle="dropdown" href="#" >功能</a>
							<ul class="dropdown-menu">
								<li>
									<ul class="menu">
										
										<c:set var="firstMenu" value="true"/>
										<c:forEach items="${fns:getMenuList()}" var="menu" varStatus="idxStatus">
											<c:if test="${menu.parent.id eq '1'&&menu.isShow eq '1'}">
												<%-- <li class="menu ${not empty firstMenu && firstMenu ? ' active' : ''}"> --%>
												<li class=" zyzLi">
													<c:if test="${empty menu.href}">
														<a id="zyzTest"  class=" zyzTest" href="javascript:" data-href="${ctx}/sys/menu/tree?parentId=${menu.id}" data-id="${menu.id}"  onclick="addTree(this,event)" >
															<i class="fa fa-bars text-aqua"></i>
															${menu.name}
														</a>
													</c:if>
													<c:if test="${not empty menu.href}">
														<a id="zyzTest"  class=" zyzTest" href="${fn:indexOf(menu.href, '://') eq -1 ? ctx : ''}${menu.href}" data-id="${menu.id}" target="mainFrame" onclick="addTree(this,event)">
															<i class="fa fa-bars text-aqua"></i>
															${menu.name}
														</a>
													</c:if>
												</li>
												<c:if test="${firstMenu}">
													<c:set var="firstMenuId" value="${menu.id}"/>
												</c:if>
												<c:set var="firstMenu" value="false"/>
											</c:if>
										</c:forEach>
									</ul>
								</li>
							</ul>
						</li>
						<li id="userInfo" class="dropdown messages-menu">
							<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="个人信息">您好, ${fns:getUser().name}&nbsp;<span id="notifyNum" class="label label-info hide"></span></a>
							<ul class="dropdown-menu">
								<li>
									<ul class="menu">
										<li><a href="${ctx}/sys/user/info" target="mainFrame"><i class="icon-user"></i>&nbsp; 个人信息</a></li>
										<li><a href="${ctx}/sys/user/modifyPwd" target="mainFrame"><i class="icon-lock"></i>&nbsp;  修改密码</a></li>
										<li><a href="${ctx}/oa/oaNotify/self" target="mainFrame"><i class="icon-bell"></i>&nbsp;  我的通知 <span id="notifyNum2" class="label label-info hide"></span></a></li>
									</ul>
								</li>
							</ul>
						</li>
						<li><a href="${ctx}/logout" title="退出登录">退出</a></li>
						<li>&nbsp;</li>
					</ul>
				</div>
				<div class="nav-collapse  navbar-custom-menu">
					<ul id="menu" class="nav   navbar-nav" style="*white-space:nowrap;float:none;">
						<%--
						<shiro:hasPermission name="cms:site:select">
						<li class="dropdown">
							<a class="dropdown-toggle" data-toggle="dropdown" href="#">${fnc:getSite(fnc:getCurrentSiteId()).name}<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<c:forEach items="${fnc:getSiteList()}" var="site"><li><a href="${ctx}/cms/site/select?id=${site.id}&flag=1">${site.name}</a></li></c:forEach>
							</ul>
						</li>
						</shiro:hasPermission> --%>
					</ul>
				</div><!--/.nav-collapse -->
			</nav>
			</div>
	    </header>
	    	<aside class="main-sidebar"></aside>
			<aside id="content" class="main-sidebar">
				<section id="left" class="sidebar">
				</section>
			</aside>
			<div style="overflow:hidden;">
			<aside id="right" class="content-wrapper" style="height: 100%;">
				<section class="content"  >
					<div class="tan hide" id="mask"  onclick="maskSetTwo()"></div>
					
						<iframe id="mainFrame" class="content" name="mainFrame" src="" style="overflow:visible;" scrolling="yes" frameborder="no"  style="width:100%;"></iframe>
					
					
				</section>
			</aside>
			</div>
		   <%--  <footer id="footer" class="main-footer" style="height: 4%;">
				    	<strong> Copyright &copy; 2012-${fns:getConfig('copyrightYear')} ${fns:getConfig('productName')} - Powered By<a href="http://www.jianglinjituan.com" target="_blank">北京江林科技</a> </strong>
			            ${fns:getConfig('version')}
					</footer> --%>
	
	<script src="${adminLET }/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.6 -->
<script src="${adminLET }/bootstrap/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<%-- <script src="${adminLET }/plugins/morris/morris.min.js"></script> --%>
<!-- Sparkline -->
<script src="${adminLET }/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="${adminLET }/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="${adminLET }/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="${adminLET }/plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="${adminLET }/plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="${adminLET }/plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="${adminLET }/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="${adminLET }/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="${adminLET }/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="${adminLET }/dist/js/app.min.js"></script>
<%-- <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="${adminLET }/dist/js/pages/dashboard.js"></script> --%>
<!-- AdminLTE for demo purposes -->
<script src="${adminLET }/dist/js/demo.js"></script>
<script type="text/javascript">
	var browser = {
	        versions: function() {
	            var u = navigator.userAgent,
	            app = navigator.appVersion;
	            return {
	                mobile: !!u.match(/AppleWebKit.*Mobile.*/),
	                ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
	                android: u.indexOf("Android") > -1 || u.indexOf("Linux") > -1,
	                iPhone: u.indexOf("iPhone") > -1,
	                iPad: u.indexOf("iPad") > -1
	            };
	        } (),
	        language: (navigator.browserLanguage || navigator.language).toLowerCase()
	    };
	   function isGoLogin(){
		   	var li = document.getElementsByClassName("zyzLi")[0].children.item(0);
			var $a = $(li);
			var url = $a.attr("data-href");
			$.get(url, function(data, textStatus, req) {
				if (data.indexOf("id=\"loginForm\"") != -1){
					alert('未登录或登录超时。请重新登录，谢谢！');
					top.location = "${ctx}";
					return false;
				}
			})
	   }
	$(document).ready(function(){
		var li = document.getElementsByClassName("zyzLi")[0].children.item(0);
		var $a = $(li);
		var url = $a.attr("data-href");
		$.get(url, function(data, textStatus, req) {
			if (data.indexOf("id=\"loginForm\"") != -1){
				alert('未登录或登录超时。请重新登录，谢谢！');
				top.location = "${ctx}";
				return false;
			}
			$("#left").html(data);
			var leaveThree = document.getElementsByClassName("leaveThree");
			for(var i = 0;i<leaveThree.length;i++){
				var a = leaveThree[i];
				var e = a.innerHTML.trim();
				if(e == null || e == '' || typeof(e)=="undefined"){
					$(a).removeClass("treeview-menu");
				}
			}
			
		})
		
		
	});
	
	
	function addTree(obj,e){
		var $obj = $(obj);
		var url = $obj.attr("data-href");
		$.get(url, function(data, textStatus, req) {
			if (data.indexOf("id=\"loginForm\"") != -1){
				alert('未登录或登录超时。请重新登录，谢谢！');
				top.location = "${ctx}";
				return false;
			}
			$("#left").html(data);
			var leaveThree = document.getElementsByClassName("leaveThree");
			for(var i = 0;i<leaveThree.length;i++){
				var a = leaveThree[i];
				var e = a.innerHTML.trim();
				if(e == null || e == '' || typeof(e)=="undefined"){
					$(a).removeClass("treeview-menu");
				}
			}
			
		})
	}
	function maskSet(){
		
	    if(browser.versions.mobile){
	    	if(!$("body").hasClass("sidebar-open")){
				$("#mask").removeClass("hide");
			}else{
				if(!$("#mask").hasClass("hide")){
					$("#mask").addClass("hide");
				}
			}
	    }
		
		
	}
	function maskSetTwo(){
		$("#mask").addClass("hide");
	}
	//mask
	//sidebar-collapse
	
</script>
	<script src="http://cdn.jsdelivr.net/sockjs/1/sockjs.min.js"></script>
	<script type="text/javascript">
		var websocket;
			 if ('WebSocket' in window) { 
			 	//alert('1');
                websocket = new WebSocket("ws://localhost:8080/jeesite/webSocketServer.ws");
             } else if ('MozWebSocket' in window) {
             	//alert('2');
                websocket = new MozWebSocket("ws://localhost:8080/jeesit/webSocketServer.ws");
            } else {
                websocket = new SockJS("http://localhost:28080/jeesit/webSocketServer.ws");
            } 
            websocket.onopen = function (evnt) {
            };
             websocket.onmessage = function (evnt) {
             	//alert(evnt.data);
                //$("#msgcount").html("(<font color='red'>"+evnt.data+"</font>)");
                var d = "(<font color='red'>"+evnt.data+"</font>)";
                
                var isHaceClass =  $("#btn_min").hasClass("n");
                if(isHaceClass){
                	$(".wrap2").html(d);
                	$("#btn_min").click();
                }else{
                	setInterval(function() {
                		$("#btn_min").click();
                		$(".wrap2").html(d);
                		$("#btn_min").click();
                	}, 4000);
                	
                }
                
                
            };
            websocket.onerror = function (evnt) {
            };
            websocket.onclose = function (evnt) {
            }
	</script>
	
	<script type="text/javascript">
		$(function(){
			var $float_layer = $(".float_layer");
			var $btn_min = $("#btn_min");
			$btn_min.click(function(){
				var isHave = $btn_min.hasClass('n');
				if(isHave){
					$btn_min.removeClass('n');
					$btn_min.addClass('y');
					$float_layer.animate({bottom:'0px'},"slow",function(){
						var to_interval = setInterval(function() {
							$btn_min.click();
							clearInterval(to_interval);
						}, 5000);
					});
				}else{
					$btn_min.removeClass('y');
					$btn_min.addClass('n');
					$float_layer.animate({bottom:'-131px'},"slow");
				}
							
			});
		});
	
	</script>
	
</body>
</html>